﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using MyAuthCore.Entity.Base;
using SqlSugar;

namespace MyAuthCore.Entity.Beans
{
    public class User : BaseEntity
    {
        public User()
        {
            this.Account = string.Empty;
            this.Password = string.Empty;
            this.Name = string.Empty;
            this.Sex = 0;
            this.State = 0;
            this.CreateTime = DateTime.Now;
        }
        [SugarColumn(IsNullable = false, Length = 21)]
        public string Account { get; set; }
        [SugarColumn(IsNullable = false, Length = 21)]
        public string Password { get; set; }
        [SugarColumn(IsNullable = false, Length = 21)]
        public string Name { get; set; }
        [SugarColumn(Length = 1)]
        public Sex Sex { get; set; }
        [SugarColumn(Length = 1)]
        public State State { get; set; }
        [SugarColumn(Length = 1)]
        public DateTime CreateTime { get; set; }
    }
    public enum Sex
    {
        /// <summary>
        /// 男
        /// </summary>
        Man = 0,
        /// <summary>
        /// 女
        /// </summary>
        Woman = 1
    }
    public enum State
    {
        /// <summary>
        /// 离线
        /// </summary>
        Offline = 0,
        /// <summary>
        /// 在线
        /// </summary>
        Online = 1,
        /// <summary>
        /// 冻结
        /// </summary>
        Frozen = 2
    }
}
